<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
        <style type="text/css">
            .statics {margin:5px;line-height:22px;}
            .statics b {margin:0 5px;color:#0064BC;font-family: Verdana;}
            .mainlist li {float:left;width:220px;display:block;height:80px;margin-bottom:10px;}
            .mainlist li i {font-style:normal;line-height:18px;color:#666;width:150px;height:80px;float:left;}
            .mainlist li b {float:left;width:55px;margin-right: 8px;text-align:center;font-weight: normal;line-height:20px;color:#666}
            .mainlist li b img{height:55px;}
            .mainlist li a {color:#B73C07}
            .onlinelist {font-family:Verdana;}
            .onlinelist a {color:#06f;font-family:Verdana;}
            .onlinelist a:hover {color:#f60;}
            #tips {color:#444;}
            #tips b{font-weight: normal;color:#06f;line-height: 20px;}
            #areadiv {margin:10px 0;}
            #areadiv tr th ,#areadiv tr td {text-align:left;padding:2px;}
            #areadiv tr th {color:#B73C07;height:25px;}
            #areadiv a{color:#B73C07}
        </style>
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:5px;">
            <tr>
                <td colspan="2">
                    <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="" valign="top">
                                <div class="intro">
                                   <b><?=translate('GENERAL_MAIN_WELCOME',$user['username'])  ?></b> <b><?= $user['role_name'] ?></b><br />
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="maintable">
            <tr><td><div  style="margin-top:10px;border-top:1px solid #ccc;">&nbsp;</div></td></tr>
            <tr><td>
                    <ul class="mainlist">
                        <?php
                        $ascii = 64;
                        foreach ($menu as $m => $n) {
                            if (isset($n['hide']) && $n['hide'])
                                continue;
                            $ascii++;
                            if (check_level_menu(50, $m)) { ?>
                                <li>
                                    <b><a href="javascript:;" title="<?= $n['name'] ?>" rel="<?= $ascii ?>"><img src="images/picture/<?= $m ?>.gif" /></a></b><i><a href="javascript:;" rel="<?= $ascii ?>"><?= $n['name'] ?>(<?= chr($ascii) ?>)</a></i>
                                </li>
                        <?php }} ?>
                    </ul>
                </td>
            </tr>
            <tr><td><div style="margin-top:10px;border-top:1px solid #ccc;">&nbsp;</div></td></tr>
            <tr>
                <td width="51%" id="tips">
                    <?=translate('GENERAL_MAIN_TIPS')?>：<br />
                    <b><?=translate('GENERAL_MAIN_SPACE_KEY')?>：</b><?=translate('GENERAL_MAIN_TOGGLE_LEFT_SHORTCUT')?> <b><?=translate('GENERAL_MAIN_ESC_KEY')?>：</b><?=translate('GENERAL_MAIN_TOGGLE_SHORTCUT')?> <b><?=translate('GENERAL_MAIN_LETTTER')?>：</b><?=translate('GENERAL_MAIN_CORRESPONDING_LEFT_MENU')?> <b>F2：</b><?=translate('SEARCH')?>
                </td>
            </tr>
        </table>
        <script type="text/javascript">
            $(function(){
                $("ul.mainlist li a").live("click", function(){
                    window.top.frames["left"].$("b.g"+$(this).attr("rel")).parent().click();
                });
                $(document).keyup(function(e){
                    e = e || window.event;
                    var t = e.keyCode;
                    //判断是否存在class
                    if($("a[rel='"+t+"']").size()>0) {
                        window.top.frames["left"].$("b.g"+t).parent().click();
                    }else if(t==27) {
                        //ESC
                        window.top.frames["left"].expand();
                    }else if(t==32) {
                        window.top.$("#switch").click();
                    }
                });
            });
        </script>
    </body>
</html>